<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a="http://richfaces.org/a4j"
	template="layout/logintemplate.xhtml">

	<ui:define name="body">
		<h:form id="loginForm">
			<center>
				<rich:panel bodyClass="bodyleft" style="width:400px;text-align:left">
					<f:facet name="header">
						<h:graphicImage value="/img/brProjectLogo.png" />
					</f:facet>

					<h:messages id="messages" globalOnly="true" styleClass="message"
						errorClass="errormsg" infoClass="infomsg" warnClass="warnmsg"
						rendered="#{showGlobalMessages != 'false'}" />

					<p>Efetue seu Login</p>

					<h:panelGrid class="dialog">

						<s:decorate id="usernameField" template="layout/edit.xhtml">
							<ui:define name="label">Usuário</ui:define>
							<h:inputText id="username" value="#{credentials.username}"
								required="true">
								<a:support event="onblur" reRender="usernameField"
									bypassUpdates="true" ajaxSingle="true" />
							</h:inputText>
						</s:decorate>

						<s:decorate id="passwordField" template="layout/edit.xhtml">
							<ui:define name="label">Senha</ui:define>
							<h:inputSecret value="#{credentials.password}"
								required="true">
								<a:support event="onblur" reRender="passwordField"
									bypassUpdates="true" ajaxSingle="true" />
							</h:inputSecret>
						</s:decorate>

						<s:decorate id="rememberField" template="layout/edit.xhtml">
							<ui:define name="label">Lembrar usuário</ui:define>
							<h:selectBooleanCheckbox id="rememberMe"
								value="#{rememberMe.enabled}">
								<a:support event="onblur" reRender="rememberField"
									bypassUpdates="true" ajaxSingle="true" />
							</h:selectBooleanCheckbox>
						</s:decorate>

					</h:panelGrid>

					<div class="actionButtons">
						<h:commandButton id="submit" value="Login"
							action="#{identity.login}" />
					</div>
				</rich:panel>
			</center>
		</h:form>
	</ui:define>
</ui:composition>